package com.jsr303;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

/**
 * Created by pengfei on 16/7/18.
 */
public class Validator implements ConstraintValidator<MyValidate1, String> {
    public void initialize(MyValidate1 myValidate1) {

    }

    public boolean isValid(String s, ConstraintValidatorContext constraintValidatorContext) {
        if(s.equals("a")){
            return true;
        }
        return false;
    }
}
